﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Window 弹出面板</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" /><link href="../demo.css" rel="stylesheet" type="text/css" />

    
    <script src="../../scripts/boot.js" type="text/javascript"></script>
    <link href="../../scripts/miniui/themes/blue/skin.css" rel="stylesheet" type="text/css" />

    <style type="text/css">
    .borderWindow .mini-panel-viewport
    {
        padding:5px;
    }
    </style>
</head>
<body>
    <h1>Window 弹出面板</h1>
    
<input type="button" value="showCenter" onclick="showCenter()"/><br />
        xAlign: <select id="xAlign">
                    <option value="outleft">OutLeft</option>
                    <option value="left" >Left</option>               
                    <option value="center" >Center</option>
                    <option value="right">Right</option>
                    <option value="outright" selected>OutRight</option>
                </select>
        yAlign: <select id="yAlign">
                    <option value="above">Above</option>
                    <option value="top" selected>Top</option>
                    <option value="middle" >Middle</option>
                    <option value="bottom">Bottom</option>
                    <option value="below">Below</option>
                </select>
    <input id="d" type="button" value="showAtEl" onclick="showAtEl()" />    


<div id="win1" class="mini-window borderWindow" title="Window" style="width:400px;height:250px;" 
    showMaxButton="true"
    showToolbar="true" showFooter="true" showModal="false" allowResize="true" allowDrag="true"
    >
    <div property="toolbar" style="padding:5px;">
        <input type='button' value='Hide' onclick="hideWindow()" style='vertical-align:middle;'/>
    </div>
    <div property="footer" style="text-align:right;padding:5px;padding-right:15px;">
        <input type='button' value='Hide' onclick="hideWindow()" style='vertical-align:middle;'/>
    </div>

    1<br />1<br />1<br />1<br />1<br />1<br />1<br />1<br />1<br />1<br />1<br />1<br />1<br />1<br />1<br />1<br />
</div>
<script type="text/javascript">
    mini.parse();
    function showCenter() {
        var win = mini.get("win1");
        win.show();

    }
    function showAtEl() {
        var win = mini.get("win1");

        var atEl = document.getElementById("d");                

        var xAlign = document.getElementById("xAlign").value;
        var yAlign = document.getElementById("yAlign").value;

        win.showAtEl(atEl, {
            xAlign: xAlign,
            yAlign: yAlign
        });
    }

    function hideWindow() {
        var win = mini.get("win1");
        win.hide();
    }
    showCenter();

</script>

    <div class="description">
        <h3>Description</h3>
        <p>
        </p>
    </div>
</body>
</html>